import { CrudApi } from './common/CrudApi'
import { addparam as ad } from './common/addparam'

class MenuApi extends CrudApi {
  /**根据登录用户角色获取菜单 */
  getByRoleCode(data) {
    return this.request.postJson(`/${this.beforeUrl}/getByRoleCode`, ad(data))
  }
  /**根据用户角色获取菜单已选菜单 */
  getSysMenuTreeBySysRoleId(data) {
    return this.request.postJson(`/${this.beforeUrl}/getSysMenuTreeBySysRoleId`, ad(data))
  }
}
/**
 * 菜单
 */
export const sysMenuApi = new MenuApi('apiWorkCZR', 'sysMenuApi')
